package com.nc.delivery_project.client.request;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;
import com.nc.delivery_project.server.service.CargoService;
import com.nc.delivery_project.shared.proxy.CargoProxy;
import com.nc.delivery_project.shared.servicelocator.CargoServiceLocator;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Natalie D.
 * Date: 1/26/15
 * Time: 10:09 PM
 */
@Service(value = CargoService.class, locator = CargoServiceLocator.class)
public interface CargoRequest extends RequestContext {

    Request<Integer> create(CargoProxy cargo);

    Request<List<CargoProxy>> read();

    Request<CargoProxy> read(int cargoId);

    Request<List<CargoProxy>> readByOrderId(int id);

    Request<Void> update(CargoProxy cargo);

    Request<Void> delete(int cargoId);
}